﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Me.Prettyprint.Hector.Api;
using Me.Prettyprint.Hector.Api.Beans;
using Me.Prettyprint.Hector.Api.Factory;
using Me.Prettyprint.Cassandra.Serializers;

namespace Me.Prettyprint.Cassandra.Model.Thrift
{
    public class ThriftColumnFactory : ColumnFactory
    {
        public HColumn<N, V> CreateColumn<N, V>(N name, V value,
            Serializer<N> nameSerializer, Serializer<V> valueSerializer)
        {
            return new HColumnImpl<N,V>(name, value, HFactory.CreateClock(), 
                nameSerializer, valueSerializer);
        }
        public  HColumn<N, V> CreateColumn<N, V>(N name, V value, long clock,
            Serializer<N> nameSerializer, Serializer<V> valueSerializer)
        {
            return new HColumnImpl<N,V>(name, value, clock, 
                nameSerializer, valueSerializer);
        }
        public HColumn<String, String> CreateStringColumn(string name, string value)
        {
            return CreateColumn(name, value, StringSerializer.Instance, StringSerializer.Instance);
        }
    }
}
